import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @ClassName Client
 * @Description TODO
 * @Author hp
 * @Date 2021/7/2 15:43
 * @Version 1.0
 **/
public class Client {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("192.168.33.48",8888);
        FileInputStream fileInputStream = new FileInputStream("C:\\Users\\hp\\Music\\DAOKO _ 米津玄師 - 打上花火.flac");
        OutputStream outputStream = socket.getOutputStream();
        byte[] bytes =new byte[1024*5];
        int len = 0;
        while ((len = fileInputStream.read(bytes))!=-1){
            outputStream.write(bytes);
        }
        outputStream.close();

    }
}
